package com.aaa.stock.service.prod.impl;

import com.aaa.entity.DictData;
import com.aaa.stock.dao.prod.StoDictDataDao;
import com.aaa.stock.service.prod.StoDictDataService;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StoDictDataServiceImpl implements StoDictDataService {
    @Autowired
    private StoDictDataDao stoDictDataDao;
    @Override
    public Result<List<DictData>> findByType(String type) {
        QueryWrapper<DictData> wrapper=new QueryWrapper<>();
        wrapper.eq("dict_type",type);
        List<DictData> list = stoDictDataDao.selectList(wrapper);
        return new Result<>(2000,"查询成功",list);
    }
}
